// Author	: damphat@gmail.com
// Created	: 01/12/2008

#pragma once
#include "vn/String.hpp"

#define HRESULT_UNKNOWN (1 << 29)

class Exception {
public:
	Exception()	: m_hResult(HRESULT_UNKNOWN) { }

	Exception(HRESULT hResult) : m_hResult(hResult)	{ }

	Exception(HRESULT hResult, const String &msg)
		: m_hResult(hResult)
		, m_msg(msg)
	{ }

	Exception(const String &msg)
		: m_hResult(HRESULT_UNKNOWN)
		, m_msg(msg)
	{ }

	virtual
	String ToString() const {
		return m_msg;
	}

	virtual ~Exception() { }

public:
	HRESULT	m_hResult;
	String  m_msg;
};
